
<%@ page import="com.carmanagement.Vehicle" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'vehicle.label', default: 'Vehicle')}" />
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'charts.css')}" type="text/css">
		<title><g:message code="default.show.label" args="[entityName]" /></title>
		<g:javascript src="vehicle.js"/>
		<gvisualization:apiImport/>
	</head>
	<body>	
	
		<a href="#show-vehicle" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<nav>
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="addCar" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</nav>
		<div id="show-vehicle" class="content scaffold-show" role="main">
			<h1><g:message code="vehicle.show.label" args="${[vehicleInstance.registerNumber]}" /></h1>
			<g:if test="${flash.message}">
				<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list vehicle">
				<li class="fieldcontain">
					<span id="registerNumber-label" class="property-label"><g:message code="vehicle.registerNumber.label" default="Register Number" /></span>
					
						<span class="property-value" aria-labelledby="registerNumber-label"><g:fieldValue bean="${vehicleInstance}" field="registerNumber"/></span>
					
				</li>			
				<li class="fieldcontain">
					<span id="fullTank-label" class="property-label"><g:message code="vehicle.fullTank.label" default="Full Tank" /></span>
				</li>
				<li class="fieldcontain">
					<div id="fullTankList">
						<g:render template="paginateFullTank" />
					</div>
				</li>
				<li class="fieldcontain">
					<div id="fullTankCharts">
						<g:render template="fullTankCharts" />
					</div>
				</li>
				<li class="fieldcontain"><span id="maintenance-label"
					class="property-label"><g:message
							code="vehicle.maintenance.label" default="Maintenance" /></span>
				</li>
				<li class="fieldcontain">
					<div id="maintenanceList">
						<g:render template="paginateMaintenance" />	
					</div>
				</li>
				<li class="fieldcontain">
					<div id="maintenanceCharts">
						<g:render template="maintenanceCharts" />
					</div>
				</li>
			</ol>
			<g:form url="[resource:vehicleInstance, action:'delete']" method="DELETE">
				<fieldset class="buttons">
					<g:link class="edit editCar" action="edit" resource="${vehicleInstance}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete deleteCar" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
